# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=chromium-bsu
pkgver=0.9.16.1
pkgrel=1
pkgdesc="A fast paced top scrolling shooter"
arch=('loong64' 'x86_64')
url="http://chromium-bsu.sourceforge.net/"
license=('custom:artistic')
depends=('freeglut' 'glu' 'sdl_image' 'openal' 'freealut' 'ftgl' 'fontconfig')
source=(https://downloads.sourceforge.net/project/chromium-bsu/Chromium%20B.S.U.%20source%20code/chromium-bsu-$pkgver.tar.gz use_fabs_for_floats.patch)
sha512sums=('1d202c0704e16b31d93c552ae6cfc17caf1182a9ec80730a981cd99c8ca8cb64d4e6e838691aa86e17ea23b7c2c0b1e7b1f4dab91bbc6129f9bf86801f2b27c8'
            '78b0de083c1c11e56aa0e864900c0c2c163f9828505402e63d5eba6092cb2ce2449747c7d5dbd40b96e801f872795a57dc5f247818f4e3d142a3f3af0d4d188d')

prepare() {
  cd $srcdir/$pkgname-$pkgver

  patch -Np1 -i $srcdir/use_fabs_for_floats.patch
}

build(){
  cd $srcdir/$pkgname-$pkgver
  ./configure --prefix=/usr
  make LDFLAGS=${LDFLAGS}
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make DESTDIR=$pkgdir install

  install -Dm644 COPYING $pkgdir/usr/share/licenses/chromium-bsu/LICENSE
}
